NOTE : The properties detailed on this page are not officially documented, so I cannot be sure of 100% accuracy for their details. This topic was put together initially, by testing different properties, methods and events, to see what their values were and whether they were accesible through Visual Basic Script. The ActiveX Control Pad and Visual Basic proved to be gold-mines during the testing.
Properties | Methods | Events |
Application, Busy, FullScreen, height, HWND, left, locationName, locationURL, menubar, Name, Parent, Path, statusbar, top, toolbar toplevelContainer, Type, Visible, width | GoBack, GoForward, GoHome, GoSearch, Navigate, Stop, Quit | None dicsovered so far |
For any window, the Explorer object properties can be referenced as :
Explorer.propertyName
When a frame based display is used, then each separate frame (or document window), contains it's own Explorer object (with suitable property values) and the whole frameset is also an Explorer object. Therefore, each different Explorer object can be referenced according to it's frame index, in the frames array (see the Frame Object). So :
windowname.frames(index).Explorer.propertyname
is also a valid way of referencing certain Explorer objects, depending on which frame the Explorer object is in. This implies that it should be possible to reference Explorer objects by referring to the window name (given in the <FRAMESET>
element), but on testing, that didn't appear to work. Both parent
and top
work satisfactorily though, for referencing the Explorer objects of the immediate windows parent and the top-most window respectively.
The Explorer object can almost be thought of as an Internet Explorer specific cross between the Navigator and Window Objects.
NOTE : The height
, width
, left
, top
, menubar
, statusbar
and toolbar
appear to be the only properties that can be dynamically changed. The dimensions and screen-location properties (height
, width
, top
and left
) all accept pixel values, while the remaining display option properties accept values of true or false, for displaying (or removing) the toolbar, status bar and menu bar.
Also, while all Explorer objects will return the correct screen-location (i.e. top
and left
) properties, there appears to be small anomaly when setting the top
and left
properties using the window.open
method. See window.open
topic for more details.
Explorer Properties
Application
The Applcation
property always appears to return the value 'Microsoft Internet Explorer', which implies it is synonymous with the navigator.appName
property.
Busy
The Busy
property is a reflection of the current Explorer objects activity status. Generally, it returns 'False' because when used to reference the current windows Explorer object, the document will already be loaded.
FullScreen
The FullScreen
property can be set to either true or false and will accordingly display the current Explorer window in fullscreen view, or however the user has Internet Explorer set up to display. Note that if the document that forces Internet Explorer to a full screen view is a single document (i.e. not framed), it will remove the menubar, statusbar, toolbar and title bar. This effectively prevents the user from having access to any method to quit Internet Explorer, apart from ending the task after pressing Ctrl+Alt+Del. If you force Internet Explorer to a full screen view, be kind and provide a way out of it. If the document is a framed one though, it reloads the current frameset with itself. (i.e. the same as if the user activated a link in the document that led to itself, with a TARGET="_top"
attribute setting) In this case, none of the Internet Explorer toolbar items are removed and the size of the open Internet Explorer window is not changed.
Internet Explorer full screen view is also known as Kiosk Mode
height
This reflects the height of the particular Explorer object in pixels. Note that if the current window (hence Explorer object) is a frame in a framed set up, then the height properties of the current and parent (or top) Explorer objects will be different.
HWND
This property reflects a number that relates to the window handle of the current Explorer object. It isn't of use to Visual Basic Script developers, as they have no way of controlling the handles of windows on the users system.
left
This reflects the left-most co-ordinate of the particular Explorer object in pixels. Note that if the current window (hence Explorer object) is a frame in a framed set up, then the left properties of the current and parent (or top) Explorer objects will be different.
locationName
The locationName
property returns the name of the current Explorer objects location. It is almost synonymous with the location.href
property (almost as in the Explorer.locationName
property returns the URL minus the protocol)
locationURL
The locationURL
property returns the name of the current Explorer objects location. It is synonymous with the location.href
property (therefore, is essentially the locationName
property, plus the protocol of the current Explorer objects location)
menubar
The menubar
property returns true or false depending on whether the current Explorer object has a menubar. In a framed document, this will obviously always be false (except for the parent.Explorer.menubar
property).
Name
The Name
property currently returns 'Microsoft Internet Explorer' and so is synonymous with the Navigator.appName
property.
Parent
This property returns the value of 'Microsoft Internet Explorer', so is synonymous with the application
and navigator.appName
properties.
Path
This property returns the full path to the Internet Explorer executable (generally 'drive:\Program Files\Microsoft Internet\'). If the WebBrowser
object is hosted in another application though, the Path
property returns the full path of the executable file that hosts the Internet Explorer WebBrowser
object.
statusbar
The status
property returns true or false depending on whether the current Explorer object has a status bar. In a framed document, this will obviously always be false (except for the parent.Explorer.menubar
property).
top
This reflects the top-most co-ordinate of the particular Explorer object in pixels. Note that if the current window (and Explorer object) is a frame in a framed set up, then the top properties of the current and parent (or top) Explorer objects will be different.
toolbar
The toolabr
property returns true or false depending on whether the current Explorer object has a toolabr. In a framed document, this will obviously always be false (except for the parent.Explorer.menubar
property).
toplevelContainer
The toplevelContainer
property is something of a mystery. During testing, it always appeared to return a value of 'True', independent of the Explorer objects nature (i.e. singular, framed, nested frame etc.)
Type
This property returns a value of 'Windows HTML viewer', so can be considered a description of the application
property.
Visible
The Visible
property surprisingly seems to reflect whether Internet Explorer currently has the users focus (as opposed to whether it is visible or not). For instance, if the explorer.visible
property value is written to the document (using a document.write
method, it returns 'True', but if it is accessed in an alert
method (thus losing focus to the alert message box), it returns 'False'.
width
This reflects the width of the particular Explorer object in pixels. Note that if the current window (and Explorer object) is a frame in a framed set up, then the width properties of the current and parent (or top) Explorer objects will be different.
Explorer Methods
GoBack
The GoBack
method is similar in function to the history.back
method in that it causes the current Explorer object to navigate to the previous URL in the history list. Note that use of the Explorer.goback
method appears to be unstable through Visual Basic Script, so the history.back
method should be used instead.
GoForward
The GoForward
method is similar in function to the history.forward
method in that it causes the current Explorer object to navigate to the next URL in the history list. Note that use of the Explorer.goforward
method appears to be unstable through Visual Basic Script, so the history.forward
method should be used instead.
GoHome
The GoHome
method causes the current Explorer object to navigate to the users designated Home page (as set in the View|Options|Navigation page in Internet Explorer).
GoSearch
The GoSearch
method causes the current Explorer object to navigate to the users designated Search page (as set in the View|Options|Navigation page in Internet Explorer).
Navigate
The Navigate
method is similar to dynamically setting the location.href
property, in that it causes the current Explorer object to navigate to a new URL. The full syntax is :
Explorer.navigate "URL", flags, target, postdata, headers
where :
URL is a fully-qualified URL (i.e. including the protocol, host etc, or the drive and path for local files) that points to the desired document to load
flags can be any of navOpenInNewWindow
, navNoHistory
, navNoReadFromCache
or navNoWriteToCache
to specify whether the new URL is loaded into a new window, whether it replaces the current history list entry (compare with the Netscape specific location.replace
method), whether a cached version of the URL (if it exists) is loaded, or whether the new URL is to be cached or not respectively.
target is the intended frame or window name.
postdata is optional information to send to the server when navigating to the URL (if not specified, then a HTTP GET request is sent, to download the page from the server).
headers is a value to specify any additional (other than the default Internet Explorer headers) to send to the server during the document request.
NOTE : Testing proved inconclusive as to the effectiveness of using this method through Visual Basic Script. It is fully functional when using the Internet Explorer WebBrowser
object in a host application, but there are other methods more reliable to perform the same operations through Visual Basic Script (such as location.href
for example).
Stop
This method forces the same action as when the user presses the Internet Explorer 'Stop' button. It stops any current Explorer activity.
Quit
The Quit
method quits the current explorer object. It's use is not recommended in a frame based site, as it generally causes Internet Explorer to crash, rather than exiting gracefully (as it does when used in a single document). Users may not be pleased if you unexpectedly quit their browsing session regardless though.
Explorer Events
The Explorer object has no events (at least none that have proved accessible through Visual Basic Script).
NOTE : There are also Container
, Document
and StatusText
properties and Refresh
, Refresh2
, GetProperty
and PutProperty
methods associated with the Explorer object, but there use (in Visual Basic Script) either causes Internet Explorer to crash, or return scripting errors, so they have not been detailed here.